#include <stdio.h>
#include <unistd.h>
#include <pthread.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <signal.h>

void* hello(void* args){
    printf("I am sub thread, my pid is %d\n", getpid());
    printf("I am sub thread, my tid is %ld\n", syscall(SYS_gettid));
}



int main(){
    printf("I am main thread, my pid is %d\n", getpid());
    printf("I am main thread, my tid is %ld\n", syscall(SYS_gettid));
    pthread_t a;
    pthread_create(&a, NULL, hello, NULL);
    pthread_join(a, NULL);
    
}